package com.lyf.baoxian.activity;

import android.app.Activity;
import android.os.Bundle;
import android.text.Html;
import android.view.View;
import android.widget.EditText;
import android.widget.TextView;

import com.lyf.baoxian.R;
import com.lyf.baoxian.utils.MyMethod;

/**
 * Created by 刘亚飞 on 2016/12/28.
 * 购买保险提交界面
 */

public class AgreenActivity extends Activity implements View.OnClickListener {
    //开始时间
    private TextView starDate;
    //结束时间
    private TextView endDate;

    private TextView tv_zj;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_agreen);
        initData();
        initView();
    }

    private void initView() {
        starDate = (TextView) findViewById(R.id.star_date);
        endDate = (TextView) findViewById(R.id.end_date);
        tv_zj = (TextView) findViewById(R.id.tv_zj);
        starDate.setOnClickListener(this);
        endDate.setOnClickListener(this);

        String str = "<font color='#FF0000'>¥3.5元/亩</font>起";
        tv_zj.setText(Html.fromHtml(str));
    }

    private void initData() {
        MyMethod.setTitle(this,"购买协议");
    }

    @Override
    public void onClick(View view) {
        switch (view.getId()){
            case R.id.star_date:
                MyMethod.showDateDiaog(AgreenActivity.this,starDate);
                break;

            case R.id.end_date:
                MyMethod.showDateDiaog(AgreenActivity.this,endDate);
                break;
        }
    }
}
